package com.dnf.listener;


import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.ServletRequestEvent;
import javax.servlet.ServletRequestListener;

import com.dnf.service.GoodsPriceService;


public class JobListener implements ServletRequestListener,ServletContextListener {
    public void contextInitialized(ServletContextEvent sce) {
    	Quartz quartz = new Quartz();
    	try {
			quartz.startJob();
		} catch (InterruptedException e) {
			System.out.println(e.getMessage());
		}
    }

    public void contextDestroyed(ServletContextEvent sce) {
        System.out.println("Web应用即将关闭......");
    }
	@Override
	public void requestDestroyed(ServletRequestEvent arg0) {

	}

	@Override
	public void requestInitialized(ServletRequestEvent arg0) {
		
	}
}